<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
<title>View Student Courses</title>
</head>
<style type="text/css">
th {text-align: right}
</style>
<body>

<?php include '../../top.html'; ?>
<?php include '../../authorization_check.php'; ?>
<?php include '../../checkStudentOnly.php'; ?>
<?php

	session_start();
	$studentID = $_SESSION['uname'];
	$year = $_SESSION['year'];
	$semester = $_SESSION['semester'];

?>

<p>
<?php
	echo "<p><h1><center>Frequently Asked Questions</center></h1></p>";

		
	require_once '../../commonutils/db/DBConnectionManager.php';

	$sqlquery = "select * from student as s, faq as f where s.programCode=f.programCode and studentID=".$studentID." and semesterID=".$year.$semester;
	
	$result = DBConnectionManager::query($sqlquery);
	if (mysql_num_rows($result) == 0)
	{
		echo "<br><center><h4>No frequently asked question item has been defined for ".$programName." program.</h4></center><br><br>";
	}
	else
	{
		$i=1;
		while($row = mysql_fetch_assoc($result))
		{
			echo "<a name=\"BookMark".$i."\"><h4>Question : ".$row['question']."</h4></a>";
			echo "Answer : ".$row['answer']."<br>";
			$i = $i + 1;
		}	
	}
?>

</p>  

<br>
<hr color="blue">
<p>
<a href="../../StudentIndex.php"> Back </a>
</p>
</body>
</html>
	
